WindowCompat

Helper for accessing features in Window.

Properties

Link copied to clipboard
Flag for enabling the Action Bar.
Link copied to clipboard
Flag for requesting an Action Bar that overlays window content.
Link copied to clipboard
Flag for specifying the behavior of action modes when an Action Bar is not present.

Functions

Link copied to clipboard
open fun enableEdgeToEdge(@NonNull window: @NonNull Window)
Enables the content of the given window to reach the edges of the window without getting inset by system insets, and prevents the framework from placing color views behind system bars.
Link copied to clipboard
@NonNull
open fun getInsetsController(@NonNull window: @NonNull Window, @NonNull view: @NonNull View): @NonNull WindowInsetsControllerCompat
Retrieves the single WindowInsetsControllerCompat of the window this view is attached to.
Link copied to clipboard
open fun <T : View?> requireViewById(@NonNull window: @NonNull Window, @IdRes id: Int): @NonNull T
Finds a view that was identified by the android:id XML attribute that was processed in onCreate, or throws an IllegalArgumentException if the ID is invalid, or there is no matching view in the hierarchy.
Link copied to clipboard
open fun setDecorFitsSystemWindows(@NonNull window: @NonNull Window, decorFitsSystemWindows: Boolean)
Sets whether the decor view should fit root-level content views for WindowInsetsCompat.